package com.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.user.entity.AdminUserRole;
import com.user.mapper.AdminUserRoleMapper;
import com.user.service.AdminUserRoleService;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class AdminUserRoleServiceImpl extends ServiceImpl<AdminUserRoleMapper, AdminUserRole> implements AdminUserRoleService {
    @Override
    public Set<String> getRoles(Integer id) {
        LambdaQueryWrapper<AdminUserRole> lambdaQueryWrapper = new LambdaQueryWrapper<AdminUserRole>();
        lambdaQueryWrapper.eq(AdminUserRole::getUserId,id);
        Set<String> set = new HashSet<>();
        baseMapper.selectList(lambdaQueryWrapper);
        return set;
    }
}
